package org.fnzn.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

@Table(name = "fngl_turnover")
@Data
public class FnglTurnover {
    /**
     * 主键
     */
    @Id
    private String id;

    //一级报备人id
    @Transient
    private String staffReportId;

    //一级报备人姓名
    @Transient
    private String staffReportName;

    //二级报备人id
    @Transient
    private String secondstaffReportId;

    //二级报备人姓名
    @Transient
    private String secondstaffReportName;
    //导购人id
    @Transient
    private String directerId;
    @Transient
    private String directerName;
    /**
     * 人员id
     */
    private String staffId;

    /**
     * 人员姓名
     */
    @Transient
    private String staffName;

    /**
     *  其他销售人员姓名
     */
    private String otherStaffName;

    /**
     * 客户id
     */
    @Column(name = "customer_id")
    private String customerId;

    /**
     * 客户姓名
     */
    @Transient
    private String customerName;

    /**
     * 客户手机号
     */
    private String customerPhone;

    /**
     * 所属项目id
     */
    @Column(name = "project_id")
    private String projectId;
    @Transient
    private String name;

    //登记楼盘id
    @Transient
    private String insertProjectId;
    //登记楼盘名称
    @Transient
    private String insertProjectName;
//    //成交楼盘id
//    @Transient
//    private String turnoverProjectId;
//    //成交楼盘名称
//    @Transient
//    private String turnoverProjectName;

    private String projectType;

    /**
     * 所属二手房id
     */
    @Transient
    private String houseId;

    /**
     * 成交房号
     */
    private String roomNumber;

    /**
     * 交易金额
     */
    private String amount;

    /**
     * 付款方式
     */
    private String payType;

    /**
     * 结算标志
     */
    private String paymentFlag;

    /**
     * 成交日期
     */
    @Column(name = "trade_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date tradeDate;

    /**
     * 成交步骤
     */
    private String step;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 删除标识（0-正常,1-删除）
     */
    @Column(name = "del_flag")
    private String delFlag;

    }